﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.IO;
using System.Text;
using System.Windows.Forms;

namespace m3uParser
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();


        }

        private void dragAndDropFileComponent1_FileDropped(object sender, DragAndDropFileControlLibrary.FileDroppedEventArgs e)
        {
            // Process each file
            // TODO
           // m3uParser.Properties.Resources.DragAndDropFileControlLibrary;
            try
            {
                string filename = e.Filenames[0]; // get only first file
                // Only open files with the appropriate extension
                string extension = Path.GetExtension(filename);
                if (extension == ".m3u")
                {
                    PlaylistToLastFM.init(filename);
                }
                else
                {
                    MessageBox.Show("Can't open files of type " + extension + ", only of .m3u");
                }

            }
            catch (Exception)
            {

                throw;
            }
            
                
            
        }
    }
}
